@import 'vant/lib/index.css';
:root {
    --blue: rgb(88, 164, 246);
    --light: #fff;
}

html,
body {
    margin: 0;
    padding: 0;
}

button {
    border: none;
    background: none var(--blue);
    color: var(--light);
    line-height: 2.5;
    cursor: pointer;
    transition: opacity 0.2s;
}

button:disabled {
    filter: grayscale(1);
    cursor: not-allowed;
}

button:not(:disabled):active {
    opacity: 0.6;
}

textarea {
    display: block;
    margin: 0;
}

.texthide {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.texthide-line2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
}

.texthide-line3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    white-space: normal;
}

.flex-box {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
}

.flex-row {
    flex-direction: row;
}

.flex-column {
    flex-direction: column;
}

.flex-acenter {
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
}

.flex-astart {
    align-items: flex-start;
}

.flex-jcenter {
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.flex-jbetween {
    justify-content: space-between;
}

.flex-jaround {
    justify-content: space-around;
}

.flex1 {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
}

.flex2 {
    -webkit-box-flex: 2;
    -webkit-flex: 2;
    flex: 2;
}

.flex3 {
    -webkit-box-flex: 3;
    -webkit-flex: 3;
    flex: 3;
}

.flex4 {
    -webkit-box-flex: 4;
    -webkit-flex: 4;
    flex: 4;
}

.flex5 {
    -webkit-box-flex: 5;
    -webkit-flex: 5;
    flex: 5;
}

.img-fix {
    background-size: cover;
    background-position: center;
    overflow: hidden;
    position: relative;
    padding-top: 100%;
}

.img-fix img {
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1;
}

.richText {
    overflow-wrap: break-word !important;
    overflow: hidden !important;
    word-break: break-all; /*强制将英文单词断行，需要将行内元素设置为块级元素*/
}

.richText img {
    max-width: 99.99% !important;
}

.disabled {
    background-color: #ddd !important;
}

@media (prefers-color-scheme: light) {
    body {
        background-color: #f4f4f4;
    }

    ::-webkit-scrollbar-track-piece {
        background-color: #f4f4f4;
    }

    ::-webkit-scrollbar-thumb {
        border-color: #f4f4f4;
    }
}

@media (prefers-color-scheme: dark) {
    &::-webkit-scrollbar-track-piece {
        background-color: #303133;
    }

    &::-webkit-scrollbar-thumb {
        background-color: #666;
        border-color: #303133;
    }

    body {
        background-color: #303133;
        color: #fff;
    }
}
